package cn.hy.mygame.entity;

import android.graphics.Canvas;
import android.graphics.Paint;
import cn.hy.mygame.model.BaseModel;
import cn.hy.mygame.view.GameView;

public class ZombieManager extends BaseModel{
	private long lastGivebirthTime;
	private boolean isAlive;
	public ZombieManager () {
		lastGivebirthTime = System.currentTimeMillis();
		isAlive = true;
	}
	
	@Override
	public void drawSelf(Canvas canvas, Paint paint) {
		if (System.currentTimeMillis() - lastGivebirthTime > 15000) {
			lastGivebirthTime = System.currentTimeMillis();
			GameView.getInstance().givebirth2Zombie();
		}
	}
	
	public boolean isAlive() {
		return isAlive;
	}

	public void setAlive(boolean isAlive) {
		this.isAlive = isAlive;
	}
}
